package com.community.feign.contents.user;

import com.community.feign.contents.dto.UserDTO;
import org.apache.ibatis.annotations.Update;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@Component
@FeignClient(name = "community-contents",path = "/user",contextId = "community-contents-user")
public interface UserFeign {

    @GetMapping("getUserByMobile")
    public UserDTO getUserByMobile(@RequestParam("mobile") String mobile);

    @PostMapping("save")
    public UserDTO save(@RequestBody UserDTO userEntity);


    /**
     * 修改用户头像
     * @param
     */
    @PostMapping("currentUserInfo")
    public boolean currentUserInfo(@RequestBody UserDTO userDTO);

}
